package com.example.app2024.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

import com.example.app2024.note.database.SQLitHelper;

public class SqliteHelper extends SQLiteOpenHelper
{

      public SqliteHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version)
      {

            super(context , name ,  factory , version);
      }

      public  SqliteHelper(Context context)
      {
            super(context , "class1.db" , null , 2);
      }

      @Override
      public void onCreate(SQLiteDatabase db)
      {
            db.execSQL("create table info(_id INTEGER PRIMARY KEY  AUTOINCREMENT NOT NULL , name varchar(20) , phone varchar(13))");

      }

      @Override
      public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
      {

      }
}
